﻿@model IEnumerable<IGrouping<string, SimpleForum.Data.Models.PostRating>>

@foreach (var Rating in Model) {
    // very messed up, get this outta the view and into an extension method or controller!
    List<string> Users = new List<string>();
    foreach (var x in Rating) { if (!Users.Contains(x.User.UserName)) { Users.Add(x.User.UserName); } }
                
    <a class="post-rating" title="rated by @String.Join(", ", Users.ToArray())" href="#">@Html.Raw(Rating.First().Rating.Image) @Rating.Key <text>x</text> @Rating.Count()</a>
}